export const constantRoute = [
    {
        path: '/',
        redirect: { name: 'login' },
        meta: {
            isRequired: false
        }
    },
    {
        path: '/login',
        component: () => import('@/views/login/index.vue'),
        name: 'login',
        meta: {
            title: '登录',
            isRequired: false
        }
    },
    {
        path: '/parent',
        redirect: { name: 'home-parent' },
        children: [
            {
                path: '/parent/home',
                component: () => import('@/views/parent/home/index.vue'),
                name: 'home-parent',
                meta: {
                    title: '首页'
                }
            },
            {
                path: '/parent/personal',
                component: () => import('@/views/parent/home/personal.vue'),
                name: 'home-personal',
                meta: {
                    title: '个人信息'
                }
            },
            {
                path: '/parent/info',
                component: () => import('@/views/parent/home/info.vue'),
                name: 'parent-info',
                meta: {
                    title: '学生基本信息'
                }
            },
            {
                path: '/parent/seemore',
                component: () => import('@/views/parent/home/seeMore.vue'),
                name: 'seeMore',
                meta: {
                    title: '查看更多'
                }
            },
            {
                path: '/parent/infoView',
                component: () =>
                    import('@/views/parent/home/infoView/index.vue'),
                name: 'infoView',
                meta: {
                    title: '学生信息查看'
                }
            },
            {
                path: '/parent/infoView/seeleave',
                component: () =>
                    import('@/views/parent/home/infoView/seeLeaves/index.vue'),
                name: 'infoView-seeleave',
                meta: {
                    title: '请假/放假'
                }
            },
            {
                path: '/parent/leavedetail/:id',
                component: () => import('@/views/parent/detail/leave.vue'),
                name: 'detail-leave',
                meta: {
                    title: '请假申请条详情'
                }
            },
            {
                path: '/parent/staydetail/:id',
                component: () => import('@/views/parent/detail/stay.vue'),
                name: 'detail-stay',
                meta: {
                    title: '留宿申请条详情'
                }
            }
        ]
    },
    {
        path: '/student',
        redirect: { name: 'home-student' },
        children: [
            {
                path: '/student/index',
                component: () => import('@/views/student/index.vue'),
                name: 'home-student',
                meta: {
                    title: '学生首页'
                }
            },
            {
                path: '/student/info',
                component: () => import('@/views/student/info.vue'),
                name: 'student-info',
                meta: {
                    title: '学生信息'
                }
            },
            {
                path: '/student/personal',
                component: () => import('@/views/student/personal.vue'),
                name: 'student-personal',
                meta: {
                    title: '个人信息'
                }
            },
            {
                path: '/student/leave/:id',
                component: () => import('@/views/student/records/r-leave.vue'),
                name: 'student-records-leave',
                meta: {
                    title: '请假条查看'
                }
            },
            {
                path: '/student/pass/:id',
                component: () => import('@/views/student/records/r-pass.vue'),
                name: 'student-records-pass',
                meta: {
                    title: '放行条查看'
                }
            },
            {
                path: '/student/stay/:id',
                component: () => import('@/views/student/records/r-stay.vue'),
                name: 'student-records-stay',
                meta: {
                    title: '留宿条查看'
                }
            },
            {
                path: '/student/application/leave',
                component: () =>
                    import('@/views/student/application/a-leave.vue'),
                name: 'student-application-leave',
                meta: {
                    title: '请假条申请'
                }
            },
            {
                path: '/student/application/pass',
                component: () =>
                    import('@/views/student/application/a-pass.vue'),
                name: 'student-application-pass',
                meta: {
                    title: '放行条申请'
                }
            },
            {
                path: '/student/application/stay',
                component: () =>
                    import('@/views/student/application/a-stay.vue'),
                name: 'student-application-stay',
                meta: {
                    title: '留宿申请'
                }
            },
            {
                path: '/student/leavemore',
                component: () => import('@/views/student/leaveMore.vue'),
                name: 'student-leavemore',
                meta: {
                    title: '查看更多'
                }
            },
            {
                path: '/student/bulletin',
                component: () => import('@/views/student/bulletin.vue'),
                name: 'student-bulletin',
                meta: {
                    title: '查看公告'
                }
            },
            {
                path: '/student/bulletin/detail/:id',
                component: () => import('@/views/student/bulletinDetail.vue'),
                name: 'student-bulletin-detail',
                meta: {
                    title: '公告详情'
                }
            },
            {
                path: '/student/reserve',
                component: () => import('@/views/student/reserve/index.vue'),
                name: 'student-reserve',
                meta: {
                    title: '预约'
                }
            },
            {
                path: '/student/reserve/psychology',
                component: () =>
                    import('@/views/student/reserve/psychology/index.vue'),
                name: 'student-reserve-psychology',
                meta: {
                    title: '心理预约'
                }
            }
        ]
    },
    {
        path: '/teacher',
        redirect: { name: 'home-teacher' },
        children: [
            {
                path: '/teacher/leave',
                name: 'home-teacher',
                redirect: { name: 'leave-system' },
                children: [
                    {
                        path: '/teacher/leave',
                        component: () =>
                            import(
                                '@/views/teacher/leaveSystem/home/index.vue'
                            ),
                        name: 'leave-system',
                        meta: {
                            title: '请假系统'
                        }
                    },
                    {
                        path: '/teacher/leave/inquireOvernightStay',
                        component: () =>
                            import(
                                '@/views/teacher/leaveSystem/inquireOvernightStay/index.vue'
                            ),
                        name: 'inquire-stayNote',
                        meta: {
                            title: '留宿申请查询'
                        }
                    },
                    {
                        path: '/teacher/leave/inquireLeaveNote',
                        component: () =>
                            import(
                                '@/views/teacher/leaveSystem/inquireLeaveNote/index.vue'
                            ),
                        name: 'inquire-leaveNote',
                        meta: {
                            title: '请假申请查询'
                        }
                    },
                    {
                        path: '/teacher/leave/notice',
                        component: () =>
                            import(
                                '@/views/teacher/leaveSystem/notice/index.vue'
                            ),
                        name: 'public-notice',
                        meta: {
                            title: '发布公告'
                        }
                    },
                    {
                        path: '/teacher/leave/noticeDetail',
                        component: () =>
                            import(
                                '@/views/teacher/leaveSystem/noticeDetail/index.vue'
                            ),
                        name: 'noticeDetail',
                        meta: {
                            title: '公告详情'
                        }
                    },
                    {
                        path: '/teacher/leave/inquirePsychologyNote',
                        component: () =>
                            import(
                                '@/views/teacher/leaveSystem/inquirePsychologyNote/index.vue'
                            ),
                        name: 'inquire-psychologyNote',
                        meta: {
                            title: '心理预约查询'
                        }
                    },
                    {
                        path: '/teacher/leave/inquirePublicClassNote',
                        component: () =>
                            import(
                                '@/views/teacher/leaveSystem/inquirePublicClassNote/index.vue'
                            ),
                        name: 'inquire-publicClassNote',
                        meta: {
                            title: '公共教室申请查询'
                        }
                    },
                    {
                        path: '/teacher/leave/leaveDetail',
                        component: () =>
                            import(
                                '@/views/teacher/leaveSystem/leaveDetail/index.vue'
                            ),
                        name: 'leaveDetail',
                        meta: {
                            title: '请假条详情'
                        }
                    },
                    {
                        path: '/teacher/leave/releaseDetail',
                        component: () =>
                            import(
                                '@/views/teacher/leaveSystem/releaseDetail/index.vue'
                            ),
                        name: 'releaseDetail',
                        meta: {
                            title: '放行条详情'
                        }
                    },
                    {
                        path: '/teacher/leave/stayDetail',
                        component: () =>
                            import(
                                '@/views/teacher/leaveSystem/stayDetail/index.vue'
                            ),
                        name: 'stayDetail',
                        meta: {
                            title: '留宿条详情'
                        }
                    }
                ]
            },
            {
                path: '/teacher/reservation',
                redirect: { name: 'reservation-index' },
                children: [
                    {
                        path: '/teacher/reservation/index',
                        component: () =>
                            import(
                                '@/views/teacher/reservationSystem/home/index.vue'
                            ),
                        name: 'reservation-index',
                        meta: {
                            title: '预约主页'
                        }
                    },
                    {
                        path: '/teacher/reservation/viewStudio',
                        component: () =>
                            import(
                                '@/views/teacher/reservationSystem/viewStudio/index.vue'
                            ),
                        name: 'teacher-studio',
                        meta: {
                            title: '工作室信息'
                        }
                    },
                    {
                        path: '/teacher/reservation/inquireReservationNote',
                        component: () =>
                            import(
                                '@/views/teacher/reservationSystem/inquireReservationNote/index.vue'
                            ),
                        name: 'inquire-reservationNote',
                        meta: {
                            title: '预约记录查询'
                        }
                    },
                    {
                        path: '/teacher/reservation/applyPublicClass',
                        component: () =>
                            import(
                                '@/views/teacher/reservationSystem/applyPublicClass/index.vue'
                            ),
                        name: 'apply-publicClass',
                        meta: {
                            title: '公共教室预约'
                        }
                    },
                    // 用于部门审批
                    {
                        path: '/teacher/reservation/publicClassDetailReview',
                        component: () =>
                            import(
                                '@/views/teacher/reservationSystem/publicClassDetailReview/index.vue'
                            ),
                        name: 'publicClassDetail',
                        meta: {
                            title: '公共教室预约详情'
                        }
                    },
                    // 用于个人查看
                    {
                        path: '/teacher/reservation/publicClassDetailInPerson',
                        component: () =>
                            import(
                                '@/views/teacher/reservationSystem/publicClassDetailInPerson/index.vue'
                            ),
                        name: 'publicClassDetailInPerson',
                        meta: {
                            title: '公共教室预约详情'
                        }
                    },
                    {
                        path: '/teacher/reservation/psychologyDetail',
                        component: () =>
                            import(
                                '@/views/teacher/reservationSystem/psychologyDetail/index.vue'
                            ),
                        name: 'psychologyDetail',
                        meta: {
                            title: '公共教室详情'
                        }
                    },
                    {
                        path: '/teacher/reservation/inquireFileNote',
                        component: () =>
                            import(
                                '@/views/teacher/reservationSystem/inquireFileNote/index.vue'
                            ),
                        name: 'apply-file',
                        meta: {
                            title: '档案预约查询'
                        }
                    },
                    {
                        path: '/teacher/reservation/fileDetail',
                        component: () =>
                            import(
                                '@/views/teacher/reservationSystem/fileDetail/index.vue'
                            ),
                        name: 'fileDetail',
                        meta: {
                            title: '预约档案详情'
                        }
                    },
                    {
                        path: '/teacher/reservation/psychologyDetail',
                        component: () =>
                            import(
                                '@/views/teacher/reservationSystem/psychologyDetail/index.vue'
                            ),
                        name: 'psychologyDetail',
                        meta: {
                            title: '心理预约详情'
                        }
                    }
                ]
            },
            {
                path: '/teacher/todo',
                component: () => import('@/views/teacher/todo/index.vue'),
                name: 'teacher-todo',
                meta: {
                    title: '待做列表'
                }
            },
            {
                path: '/teacher/info',
                component: () => import('@/views/teacher/info/index.vue'),
                name: 'teacher-info',
                meta: {
                    title: '老师信息'
                }
            },
            {
                path: '/teacher/profile',
                component: () => import('@/views/teacher/profile/index.vue'),
                name: 'teacher-profile',
                meta: {
                    title: '老师信息'
                }
            }
        ]
    },
    {
        path: '/404',
        component: () => import('@/views/404/index.vue'),
        name: '404',
        meta: {
            title: '404',
            isRequired: false
        }
    },
    {
        path: '/:pathMatch(.*)*',
        redirect: { name: '404' },
        meta: {
            isRequired: false
        }
    }
];
